package org.jeecg.modules.lab.cert.client;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.lab.user.entity.SysUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@FeignClient(name = "jeecg-system")
public interface UserClient {

    @PostMapping(value = "/sys/user/listUser")
    Page<SysUser> listUser(@RequestBody SysUser user, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                           @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize);

    //根据id查询人员信息
    @GetMapping(value = "sys/user/queryById")
    Result<SysUser> queryById(@RequestParam(name = "id",required = true)String id);

    //根据部门id查询人员信息
    @GetMapping(value = "sys/user/queryUserByDepId")
    public Result<List<SysUser>> queryUserByDepId(@RequestParam(name = "id", required = true) String id, @RequestParam(name = "realname", required = false) String realname);
}
